class Solution:
    def maxVowels(self, s: str, k: int) -> int:
        ans = 0
        tem = 0
        pre = 0
        t = ['a','e','i','o','u']
        for i in range(k-1):
            if s[i] in t:
                tem += 1
        for i in range(k-1,len(s)):
            if s[i] in t:
                tem += 1
            ans = max(ans,tem)
            if s[pre] in t:
                tem -= 1
            pre += 1
        return ans
